const Router = require('koa-router')


const router = new Router({
  prefix:'/sjj'
})

// 折线图数据
router.get('/chartData', async (ctx, next) => {

  ctx.body = {
    code: 200,
    message: "调用成功。",
    result: {
      dataOne: {
        buyerData: [100, 120, 161, 134, 105, 160, 165],
        payData: [120, 82, 91, 154, 162, 140, 145],
        refData: [130, 182, 191, 254, 262, 240, 245],
        refData2: [10, 12, 19, 25, 26, 20, 25]
      },
      dataTwo: {
        buyerData: [123, 213, 124, 435, 453, 444, 443],
        payData: [342, 435, 456, 432, 545, 561, 564],
        refData: [789, 646, 564, 464, 646, 644, 456],
        refData2: [646, 978, 645, 644, 311, 789, 312]
      },
      dataThree: {
        buyerData: [788, 455, 343, 566, 646, 644, 653],
        payData: [321, 111, 555, 880, 654, 450, 789],
        refData: [123, 564, 645, 994, 456, 789, 464],
        refData2: [1540, 1256, 1219, 2315, 2116, 230, 215]
      },
      dataFour: {
        buyerData: [546, 988, 656, 562, 565, 457, 2544],
        payData: [415, 812, 191, 1541, 1162, 1410, 1145],
        refData: [987, 978, 789, 465, 998, 546, 645],
        refData2: [103, 122, 119, 2325, 726, 920, 525]
      }
    }
  }
})

module.exports = router